<!DOCTYPE html>
<html>
<head>
    <title>Ollama 智能问答</title>
    <style>
        body { font-family: Arial, sans-serif; max-width: 800px; margin: 0 auto; padding: 20px; }
        .chat-box { border: 1px solid #ddd; padding: 20px; border-radius: 5px; margin-bottom: 20px; }
        textarea { width: 100%; padding: 10px; margin-bottom: 10px; }
        button { background: #4CAF50; color: white; border: none; padding: 10px 15px; cursor: pointer; }
    </style>
</head>
<body>
    <h1>Ollama 智能问答</h1>
    <div class="chat-box">
        <form method="POST">
            <textarea name="prompt" rows="4" placeholder="输入您的问题..."></textarea>
            <button type="submit">提交</button>
        </form>
        {% if response %}
        <div class="response">
            <h3>回答:</h3>
            <p>{{ response }}</p>
        </div>
        {% endif %}
    </div>
</body>
</html>